          <%@ page session="true" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<div id="warresulttop">
<!-- TOP -->
</div>
      <c:choose> 
  <c:when test='${win == "true"}'>  
  
          <!--  FIXME This will just display the battle screen informing the user to check later
          Open questions: How much later?
          Notification needs to be build
           -->
      <div id="warresultwinbg">
                            <br>
                            You have won the match!
                             <c:choose> 
  <c:when test='${fw == "true"}'>  
  Flawless Victory. <br> 
 </c:when> 
 <c:otherwise>  
 Pyrrihic victory.
 Both sides suffered casualty.
  </c:otherwise> 
 </c:choose>
 <br><br>
 You have ${warcount} victories
                    
                        </div>
                        
                      
                 <script type="text/javascript" >
 var enemy='${enemy}';
	 $('#enemypanel').html("");
	 showWarLocations();
	 delayShow();
	
	 
	 jConfirm('<img src="images/feeds/win1.png"> <br> <br>Would you like to announce your victory?', 'War trumphet!', 
				function(r) {
		    if(r===true)
		    	{
			publishPost('me','I just won a territory on Global Domination!','Winner','I have conquered a territory in my enemy country. Come join me to raise an army, be a politician, research new technologies and be a Global Dominator','http://global-dominator.appspot.com/images/feeds/win1.png');
			publishPost(enemy,'I just looted your territory on Global Domination','Territory Lost','I have conquered your territory in Global Domination and increased my number of victories against your country','http://global-dominator.appspot.com/images/feeds/lose3.png');
			}
	 });
		    	
 syncMilServer();
 </script>
            
 </c:when> 
 <c:otherwise>  
 
                            <div id="warresultlosebg">
                           You have lost the match! <br>
                           
                            
                            </div>
     
   <script type="text/javascript" >

//	 publishPost("I attempted to conquer a territory on Global Domination!","Global Domination","Lead your country! Conquer the world!","I attempted to conquer a territory in my enemy country but lost. I need your help. Come join me to raise an army, be a politician, research new technologies & be a Global Dominator!",'http://global-dominator.appspot.com/images/feeds/lose.png','Share your information with your friends');

 syncMilServer();
 
         </script>
        
            
 
  </c:otherwise> 
 </c:choose> 
        
        <div id="warresultbot">
<!-- BOTTOM -->
</div>
             